Glenn Morris [Sun, 3 May 2020 14:50:21 +0000 (07:50 -0700)]
Merge from origin/emacs-27
0a3731feef Make memq etc. examples more like they were
ed25282b82 Document effect of 'search-upper-case' on replacement comm...
5a5d8a8ec0 * lisp/desktop.el (desktop-save): Doc fix. (Bug#41007)
Glenn Morris [Sun, 3 May 2020 14:50:21 +0000 (07:50 -0700)]
; Merge from origin/emacs-27
The following commit was skipped:
fc8e02a4d5 (emacs-27) ; Auto-commit of loaddefs files.
Glenn Morris [Sun, 3 May 2020 14:50:21 +0000 (07:50 -0700)]
Merge from origin/emacs-27
1d477a0fec Recommend to avoid unnecessary abbreviations in doc
aea1b4db72 Revert "Fix calculator division truncation (bug#40892)"
Glenn Morris [Sun, 3 May 2020 14:50:21 +0000 (07:50 -0700)]
; Merge from origin/emacs-27
The following commit was skipped:
82140c510c Fix calculator division truncation (bug#40892)
Glenn Morris [Sun, 3 May 2020 14:50:20 +0000 (07:50 -0700)]
Merge from origin/emacs-27
1f17193e00 Expand file name for remote dirs as well
7a12ab5ea2 Fix project.el commands in "transient" projects
274ec97e3c Make sure alist-related functions say so in their doc
Stefan Kangas [Sun, 3 May 2020 14:21:51 +0000 (16:21 +0200)]
Remove redundant :groups args missed in last commit
* lisp/emacs-lisp/cl-indent.el (lisp-lambda-list-keyword-alignment)
(lisp-lambda-list-keyword-parameter-indentation)
(lisp-lambda-list-keyword-parameter-alignment)
(lisp-indent-backquote-substitution-mode): Remove redundant :group args.
Stefan Kangas [Sun, 3 May 2020 14:19:09 +0000 (16:19 +0200)]
Improve indentation of 'loop' forms
* lisp/emacs-lisp/cl-indent.el (lisp-loop-keyword-indentation)
(lisp-loop-forms-indentation, lisp-simple-loop-indentation): Use a
more standard indentation of 'loop' forms. (Bug#2160)
(lisp-indent-maximum-backtracking, lisp-tag-indentation)
(lisp-tag-body-indentation, lisp-backquote-indentation)
(lisp-loop-keyword-indentation, lisp-loop-forms-indentation)
(lisp-simple-loop-indentation): Remove redundant :group args.
Stefan Kangas [Sun, 3 May 2020 14:17:08 +0000 (16:17 +0200)]
Use lexical-binding in w32-vars.el
* lisp/w32-vars.el: Use lexical-binding.
(w32-use-w32-font-dialog, w32-allow-system-shell
(w32-system-shells, w32-fixed-font-alist): Remove redundant :group
args.
Eli Zaretskii [Sun, 3 May 2020 13:53:53 +0000 (16:53 +0300)]
Improve accuracy of apropos commands that search doc strings
It is conceptually wrong for apropos commands that search doc
strings to look for matches of several words only on the same
line, because division of doc strings between lines is
ephemeral.
* lisp/apropos.el (apropos-parse-pattern): Accept an optional
argument MULTILINE-P, and if that is non-nil, produce regexps that
match words in the list even if they are separated by line
boundaries.
(apropos-value, apropos-local-value, apropos-documentation): Use
the new optional argument in apropos commands that search
multiline text, such as doc strings.
* src/search.c (Fposix_looking_at, Fposix_string_match)
(Fposix_search_backward, Fposix_search_forward): Make sure Posix
appears in the doc strings near REGEXP, for better matches.
Mattias Engdegård [Sun, 3 May 2020 12:22:50 +0000 (14:22 +0200)]
Regexps cannot infloop; fix manual
* doc/lispref/searching.texi (Regexp Special): Edit erroneous
statements about infinite looping in regexps.
Michael Albinus [Sun, 3 May 2020 11:59:50 +0000 (13:59 +0200)]
Do not delete asynchronous Tramp processes due to session timeout
* lisp/net/tramp-cmds.el (tramp-cleanup-connection): New optional
argument KEEP-PROCESSES.
* lisp/net/tramp-sh.el (tramp-timeout-session): Use it. (Bug#41042)
Michael Albinus [Sun, 3 May 2020 11:59:08 +0000 (13:59 +0200)]
Improve Tramp debug messages
* lisp/net/tramp-cache.el (tramp-get-file-property)
(tramp-get-connection-property): Improve debug messages.
Suggested by Marc Herbert <marc.herbert@gmail.com>.
Stefan Kangas [Sat, 2 May 2020 20:50:14 +0000 (22:50 +0200)]
Use lexical-binding for some term libraries
This takes care of the most trivial cases, but there are more that
could be easily converted.
* lisp/term/bobcat.el:
* lisp/term/cygwin.el:
* lisp/term/konsole.el:
* lisp/term/linux.el:
* lisp/term/vt100.el:
* lisp/term/vt200.el: Use lexical-binding.
Paul Eggert [Sat, 2 May 2020 20:48:21 +0000 (13:48 -0700)]
Make memq etc. examples more like they were
Problem reported by Štěpán Němec in:
https://lists.gnu.org/r/emacs-devel/2020-05/msg00130.html
* doc/lispref/lists.texi (Sets And Lists, Association Lists):
Revert examples to be more like the way they were, using
self-evaluating expressions. Be more consistent about listing
unspecified results.
Stefan Kangas [Sat, 2 May 2020 20:41:20 +0000 (22:41 +0200)]
Improve Info-mode doc and menu
* lisp/info.el (Info-mode-menu): Re-arrange to be more logical, move
items into submenus, add 'Info-directory' and separators.
(Info-mode): Add 'end-of-buffer' to doc string. (Bug#39042)
Michael Albinus [Sat, 2 May 2020 10:48:55 +0000 (12:48 +0200)]
;; Revert recent change in tramp-cache.el
* lisp/net/tramp-cache.el (tramp-dump-connection-properties):
Remove compatibility code dumping the persistency file. Use
`emacs-lisp-mode' for backward compatibility.
Eli Zaretskii [Sat, 2 May 2020 08:45:05 +0000 (11:45 +0300)]
Fix 'count-screen-lines' when lines are truncated
* lisp/window.el (count-screen-lines): Fix the return value when
lines are truncated in the window, and the end of the region is
invisible due to this truncation. (Bug#40849)
Eli Zaretskii [Sat, 2 May 2020 07:54:01 +0000 (10:54 +0300)]
Document effect of 'search-upper-case' on replacement commands
* doc/emacs/search.texi (Replacement and Lax Matches): Document
the role of 'search-upper-case' in replacement commands.
(Lax Search): Document the value 'not-yanks' of
'search-upper-case' where the variable itself is documented.
* lisp/replace.el (query-replace-regexp, query-replace): Mention
'search-upper-case' and its effect in doc strings. (Bug#40940)
João Távora [Fri, 1 May 2020 23:10:51 +0000 (00:10 +0100)]
Properly fix embarassing missing paren typo in jsonrpc.el
Paul Eggert had fixed it in practice, but the missing paren
was meant to close a previous with-current-buffer.
* lisp/jsonrpc.el (initialize-instance): Put parenthesis in right spot.
(Version): Bump to 1.0.11
Eli Zaretskii [Fri, 1 May 2020 19:59:27 +0000 (22:59 +0300)]
* lisp/desktop.el (desktop-save): Doc fix. (Bug#41007)
Michael Heerdegen [Fri, 1 May 2020 00:08:17 +0000 (02:08 +0200)]
Inhibit modification hooks when saving eieio-persistent's
* lisp/emacs-lisp/eieio-base.el (eieio-persistent-save): Bind
inhibit-modification-hooks -> t.
Michal Nazarewicz [Sun, 26 Apr 2020 18:30:41 +0000 (19:30 +0100)]
cc-mode: add support for Doxygen documentation style
* lisp/progmodes/cc-fonts.el (doxygen-font-lock-doc-comments,
doxygen-font-lock-keywords): New constants defining Doxygen
comment style support.
* lisp/progmodes/cc-vars.el (c-doc-comment-style): Updated docstring
to mention now-supported Doxygen mode.
Paul Eggert [Fri, 1 May 2020 17:50:03 +0000 (10:50 -0700)]
* lisp/jsonrpc.el (initialize-instance): Fix closing-paren typo.
João Távora [Fri, 1 May 2020 12:24:56 +0000 (13:24 +0100)]
Consolidate lisp/jsonrpc.el logging in single events buffer
For inferior processes having useful stderr, it is no longer
cumbersome to switch between different buffers to correlate error
messages with transport-level JSONRPC messages.
The existing stderr and stdout buffers can still be found hidden away
from the normal buffer list.
An original idea of Tobias Rittweiler <trittweiler@gmail.com>.
* lisp/jsonrpc.el (initialize-instance jsonrpc-process-connection):
Setup after-change functions stderr buffer. Hide stderr and stdout
buffers.
(jsonrpc--log-event): Don't output extra newline. Tweak log format.
(Version): Bump to 1.0.10
Basil L. Contovounesios [Fri, 1 May 2020 13:44:56 +0000 (14:44 +0100)]
; Fix recent additions with lisp-data-mode
* lisp/bookmark.el (bookmark-insert-file-format-version-stamp)
(save-place-alist-to-file): Delimit file-local variables on the -*-
line with semicolons.
* lisp/files.el (auto-mode-alist): Use shy regexp group.
Glenn Morris [Fri, 1 May 2020 13:27:00 +0000 (06:27 -0700)]
; Auto-commit of loaddefs files.
Glenn Morris [Fri, 1 May 2020 13:12:54 +0000 (06:12 -0700)]
; Auto-commit of loaddefs files.
Alan Mackenzie [Fri, 1 May 2020 12:23:15 +0000 (12:23 +0000)]
Protect non-selected face spec components in custimize-face. Fixes bug #40866
* lisp/cus-edit.el (custom-face-save): If the current face widget is only
displaying part of the face spec, temporarily set it to "display" the whole
spec around the call to custom-face-mark-to-save.
João Távora [Sat, 18 Apr 2020 01:46:04 +0000 (02:46 +0100)]
Add lisp-data-mode for editing non-code Lisp data
Fixes: bug#40573
The new mode can be used stand-alone or inherited from by modes
intended to edit programs. The existing emacs-lisp-mode and lisp-mode
are examples.
Thanks to Juri Linkov and Basil L. Contovounesios for researching some
data files in Emacs that can be automatically set to use the new mode.
* lisp/files.el (auto-mode-alist): Add entry for ".dir-locals" and
".dir-locals-2"
* lisp/emacs-lisp/lisp-mode.el: (lisp-data-mode): New major mode.
(lisp-mode): Inherit from lisp-data-mode. Set special lisp-mode
stuff here.
* lisp/progmodes/elisp-mode.el (emacs-lisp-mode): Inherit from
lisp-data-mode.
* lisp/bookmark.el (bookmark-insert-file-format-version-stamp):
Use lisp-data-mode.
* lisp/saveplace.el (save-place-alist-to-file): Use
lisp-data-mode.
* lisp/net/eww.el (eww-write-bookmarks): Use lisp-data-mode.
* lisp/net/nsm.el (nsm-write-settings): Use lisp-data-mode.
* lisp/net/tramp-cache.el (tramp-dump-connection-properties): Use
lisp-data-mode.
* etc/NEWS: Mention lisp-data-mode.
* doc/lispref/modes.texi (Example Major Modes): Update example.
Stefan Kangas [Fri, 1 May 2020 11:02:38 +0000 (13:02 +0200)]
Use lexical-binding in most remaining tests
* test/lisp/comint-tests.el:
* test/lisp/custom-resources/custom--test-theme.el:
* test/lisp/dabbrev-tests.el:
* test/lisp/emulation/viper-tests.el:
* test/lisp/erc/erc-track-tests.el:
* test/lisp/gnus/gnus-tests.el:
* test/lisp/imenu-tests.el:
* test/lisp/info-xref-tests.el:
* test/lisp/jit-lock-tests.el:
* test/lisp/json-tests.el:
* test/lisp/man-tests.el:
* test/lisp/replace-tests.el:
* test/lisp/shadowfile-tests.el:
* test/lisp/subr-tests.el:
* test/lisp/thingatpt-tests.el:
* test/lisp/xml-tests.el: Use lexical-binding.
* test/lisp/man-tests.el (man-tests-filter-strings):
* test/lisp/shadowfile-tests.el (shadow-test00-clusters)
(shadow-test01-sites, shadow-test06-literal-groups)
(shadow-test07-regexp-groups, shadow-test09-shadow-copy-files):
Silence byte-compiler.
Michael Heerdegen [Thu, 9 Apr 2020 23:21:33 +0000 (01:21 +0200)]
Make `make-local-variable' declare the var locally dynamic
The only effect of this change is to get rid of some unnecessary
"assignment to free variable" warnings.
* lisp/emacs-lisp/bytecomp.el (byte-compile-make-local-variable): New
function.
Mattias Engdegård [Thu, 30 Apr 2020 13:06:06 +0000 (15:06 +0200)]
Fix calculator division truncation (bug#40892)
* lisp/calculator.el (calculator-string-to-number): Convert decimal
numbers input to float, fixing a regression introduced in
f248292ede.
Reported by Aitor Soroa.
Stefan Kangas [Thu, 30 Apr 2020 16:02:28 +0000 (18:02 +0200)]
Recommend to avoid unnecessary abbreviations in doc
* doc/lispref/tips.texi (Documentation Tips): Recommend to avoid
unnecessary abbreviations. (Bug#40011)
Eli Zaretskii [Thu, 30 Apr 2020 14:02:57 +0000 (17:02 +0300)]
Revert "Fix calculator division truncation (bug#40892)"
This reverts commit
82140c510c4d27e639b4bca1e9bf158f0f66c375.
(Bug#40892)
Mattias Engdegård [Thu, 30 Apr 2020 13:06:06 +0000 (15:06 +0200)]
Fix calculator division truncation (bug#40892)
* lisp/calculator.el (calculator-string-to-number): Convert decimal
numbers input to float, fixing a regression introduced in
f248292ede.
Reported by Aitor Soroa.
Stefan Kangas [Thu, 30 Apr 2020 10:06:48 +0000 (12:06 +0200)]
Use lexical-binding in most remaining emacs-lisp tests
* test/lisp/emacs-lisp/edebug-resources/edebug-test-code.el:
* test/lisp/emacs-lisp/eieio-tests/eieio-test-methodinvoke.el:
* test/lisp/emacs-lisp/eieio-tests/eieio-test-persist.el:
* test/lisp/emacs-lisp/faceup-resources/faceup-test-mode.el:
* test/lisp/emacs-lisp/faceup-resources/faceup-test-this-file-directory.el:
* test/lisp/emacs-lisp/faceup-tests/faceup-test-basics.el:
* test/lisp/emacs-lisp/faceup-tests/faceup-test-files.el:
* test/lisp/emacs-lisp/package-resources/newer-versions/new-pkg-1.0.el:
* test/lisp/emacs-lisp/package-resources/newer-versions/simple-single-1.4.el:
* test/lisp/emacs-lisp/package-resources/simple-depend-1.0.el:
* test/lisp/emacs-lisp/package-resources/simple-single-1.3.el:
* test/lisp/emacs-lisp/package-resources/simple-two-depend-1.1.el:
* test/lisp/emacs-lisp/package-tests.el:
* test/lisp/emacs-lisp/shadow-resources/p1/foo.el:
* test/lisp/emacs-lisp/shadow-resources/p2/FOO.el: Use lexical-binding.
* test/lisp/emacs-lisp/eieio-tests/eieio-test-methodinvoke.el
(eitest-F, eitest-H, eitest-I, constructor, make-instance)
(initialize-instance, CNM-M):
* test/lisp/emacs-lisp/package-tests.el (with-package-test)
(package-test-update-archives, package-test-signed): Silence byte-compiler.
Basil L. Contovounesios [Thu, 30 Apr 2020 10:01:13 +0000 (11:01 +0100)]
; Silence byte-compiler warning in version.el
* lisp/version.el (emacs-repository-get-version): Prefix unused
argument with underscore.
Basil L. Contovounesios [Thu, 30 Apr 2020 09:46:54 +0000 (10:46 +0100)]
; Fix last addition to dom-tests.el
* test/lisp/dom-tests.el (dom-tests-remove-attribute): Make test
idempotent by avoiding destructive modification of constant literal.
Stefan Kangas [Thu, 30 Apr 2020 08:36:54 +0000 (10:36 +0200)]
Use lexical-binding in qp.el and add tests
* test/lisp/mail/qp-tests.el: New file.
* lisp/mail/qp.el: Use lexical-binding.
Lars Ingebrigtsen [Thu, 30 Apr 2020 04:05:17 +0000 (06:05 +0200)]
Add new function dom-remove-attribute
* doc/lispref/text.texi (Document Object Model): Document it.
* lisp/dom.el (dom-remove-attribute): Add new function.
Dmitry Gutov [Wed, 29 Apr 2020 19:46:17 +0000 (22:46 +0300)]
Expand file name for remote dirs as well
* lisp/progmodes/project.el (project--files-in-directory):
Expand file name for remote dirs as well (bug#40940).
Eli Zaretskii [Wed, 29 Apr 2020 15:58:42 +0000 (18:58 +0300)]
Fix project.el commands in "transient" projects
* lisp/progmodes/project.el (project--files-in-directory): Run
local DIR directory names through 'expand-file-name', so that "~/"
is expanded, in case the shell doesn't or the shell's notion of
the home directory is different from that of Emacs. (Bug#40940)
Stephen Gildea [Wed, 29 Apr 2020 14:36:07 +0000 (07:36 -0700)]
Test iso8601-parse-zone vs format-time-string %z
* test/lisp/calendar/iso8601-tests.el
(iso8601-format-time-string-zone-round-trip): New unit test that
format-time-string %z and iso8601-parse-zone are inverses.
(test-iso8601-format-time-string-zone-round-trip): New helper function.
Eli Zaretskii [Wed, 29 Apr 2020 14:52:53 +0000 (17:52 +0300)]
Make sure alist-related functions say so in their doc
* src/fns.c (Fassq, assq_no_quit, Fassoc, assoc_no_quit, Frassq)
(Frassoc): Rename argument LIST to ALIST. Doc strings updated.
Glenn Morris [Wed, 29 Apr 2020 14:50:20 +0000 (07:50 -0700)]
Merge from origin/emacs-27
2f9bfaef21 (origin/emacs-27) ; Fix last change
520fd3e728 * lisp/env.el (substitute-env-vars): Doc fix. (Bug#40948)
85544f8ef5 * lisp/isearch.el: Fix lazy-highlighting and lazy-counting...
d83cc05a73 Fix error in ERC when 'erc-server-coding-system' is custom...
16fed05ba8 Avoid crashes on TTY frames with over-long compositions
0278741676 Fix typo in custom.texi
9f5ae717fb * test/lisp/simple-tests.el (with-shell-command-dont-erase...
1f76a16ed3 * lisp/image-mode.el (image-mode-map): Update menu items.
f0e1bf56f0 Fix bugs in tab-bar and tab-line and mention remaining fea...
f0b9f18457 Make shell-command tests fit for tcsh.
68f4a740a1 Remove doc duplication
ac31cd384c * etc/NEWS: Fix inconsistencies.
# Conflicts:
# etc/NEWS
Eli Zaretskii [Wed, 29 Apr 2020 11:15:03 +0000 (14:15 +0300)]
; Fix last change
Eli Zaretskii [Wed, 29 Apr 2020 11:06:35 +0000 (14:06 +0300)]
* lisp/env.el (substitute-env-vars): Doc fix. (Bug#40948)
Stefan Kangas [Wed, 29 Apr 2020 08:28:07 +0000 (10:28 +0200)]
Use lexical-binding in most eshell tests
* test/lisp/eshell/em-hist-tests.el:
* test/lisp/eshell/em-ls-tests.el:
* test/lisp/eshell/esh-opt-tests.el: Use lexical-binding.
Stefan Kangas [Wed, 29 Apr 2020 07:52:34 +0000 (09:52 +0200)]
Add new tests to bindat-tests.el
* test/lisp/emacs-lisp/bindat-tests.el (bindat-test-format-vector)
(bindat-test-vector-to-dec, bindat-test-vector-to-hex)
(bindat-test-ip-to-string): New tests.
* lisp/emacs-lisp/bindat.el (bindat-vector-to-hex): Fix typo.
Stefan Kangas [Tue, 28 Apr 2020 22:11:56 +0000 (00:11 +0200)]
Use lexical-binding in float-sup.el and add tests
* lisp/emacs-lisp/float-sup.el: Use lexical-binding.
* test/lisp/emacs-lisp/float-sup-tests.el: New file.
Juri Linkov [Tue, 28 Apr 2020 23:49:44 +0000 (02:49 +0300)]
* lisp/isearch.el: Fix lazy-highlighting and lazy-counting of hidden matches
* lisp/isearch.el (isearch-lazy-highlight-search): Let-bind
search-invisible to t when search-invisible is 'open' or when both
isearch-lazy-count and search-invisible are non-nil. (Bug#40808)
Stefan Kangas [Tue, 28 Apr 2020 21:54:28 +0000 (23:54 +0200)]
Use lexical-binding in rfc2368.el and add tests
* lisp/mail/rfc2368.el: Use lexical-binding.
* test/lisp/mail/rfc2368-tests.el: New file.
Stefan Kangas [Tue, 28 Apr 2020 21:35:00 +0000 (23:35 +0200)]
Use lexical-binding in version.el and add tests
* lisp/version.el: Use lexical-binding.
* test/lisp/version-tests.el: New file.
Eli Zaretskii [Tue, 28 Apr 2020 17:22:50 +0000 (20:22 +0300)]
Fix error in ERC when 'erc-server-coding-system' is customized
* lisp/erc/erc-backend.el (erc-split-line): Handle the case where
'erc-coding-system-for-target' returns a coding-system's symbol.
(Bug#40914)
Stefan Kangas [Tue, 28 Apr 2020 16:13:58 +0000 (18:13 +0200)]
Use lexical-binding in puny.el and add more tests
* lisp/net/puny.el: Use lexical-binding.
* test/lisp/net/puny-tests.el (puny-test-encode-domain)
(puny-test-decode-domain, puny-highly-restrictive-domain-p): New
tests.
Stefan Kangas [Tue, 28 Apr 2020 15:35:12 +0000 (17:35 +0200)]
Use lexical-binding in hmac-md5.el and add tests
* lisp/net/hmac-md5.el: Use lexical-binding.
* test/lisp/net/hmac-md5-tests.el: New file.
Stefan Kangas [Tue, 28 Apr 2020 14:33:08 +0000 (16:33 +0200)]
Use lexical-binding in many emacs-lisp tests
* test/lisp/emacs-lisp/bytecomp-tests.el:
* test/lisp/emacs-lisp/ert-x-tests.el:
* test/lisp/emacs-lisp/nadvice-tests.el:
* test/lisp/emacs-lisp/pcase-tests.el:
* test/lisp/emacs-lisp/seq-tests.el:
* test/lisp/emacs-lisp/subr-x-tests.el:
* test/lisp/emacs-lisp/text-property-search-tests.el: Use
lexical-binding.
* test/lisp/emacs-lisp/seq-tests.el (test-seq-filter)
(test-seq-remove, test-seq-count, test-seq-every-p): Silence
byte-compiler.
Stefan Kangas [Tue, 28 Apr 2020 14:11:47 +0000 (16:11 +0200)]
Use lexical-binding in most semantic tests
* test/lisp/cedet/semantic-utest-fmt.el:
* test/lisp/cedet/semantic-utest-ia.el:
* test/lisp/cedet/semantic-utest.el:
* test/lisp/cedet/srecode-utest-getset.el:
* test/lisp/cedet/srecode-utest-template.el: Use lexical-binding.
* test/lisp/cedet/semantic-utest-fmt.el (semantic-fmt-utest):
* test/lisp/cedet/semantic-utest.el (semantic-utest-generic)
(semantic-utest-Python, semantic-utest-Javascript)
(semantic-utest-Java, semantic-utest-Makefile)
(semantic-utest-Scheme, semantic-utest-Html, semantic-utest-PHP)
(semantic-utest-Csharp, semantic-utest-last-invalid):
* test/lisp/cedet/semantic-utest-ia.el (semantic-ia-utest-buffer)
(semantic-symref-test-count-hits-in-tag):
* test/lisp/cedet/srecode-utest-getset.el
(srecode-insert-getset-fully-automatic-flag): Silence
byte-compiler.
Stefan Kangas [Tue, 28 Apr 2020 12:12:25 +0000 (14:12 +0200)]
Don't skip test semantic-utest-Python
* test/lisp/cedet/semantic-utest.el (semantic-utest-Python):
Ensure test is not skipped.
Stefan Kangas [Tue, 28 Apr 2020 11:54:00 +0000 (13:54 +0200)]
Use lexical-binding in most progmodes tests
* test/lisp/progmodes/etags-tests.el:
* test/lisp/progmodes/f90-tests.el:
* test/lisp/progmodes/ps-mode-tests.el:
* test/lisp/progmodes/python-tests.el:
* test/lisp/progmodes/ruby-mode-tests.el:
* test/lisp/progmodes/subword-tests.el:
* test/lisp/progmodes/tcl-tests.el:
* test/lisp/progmodes/xref-tests.el: Use lexical-binding.
* test/lisp/progmodes/python-tests.el (python-tests-visible-string)
(python-tests-look-at-1, python-tests-look-at-2)
(python-shell-calculate-process-environment-2): Silence byte-compiler.
Eli Zaretskii [Tue, 28 Apr 2020 08:57:16 +0000 (11:57 +0300)]
Avoid crashes on TTY frames with over-long compositions
* src/term.c (encode_terminal_code): Each character from an
automatic composition is a multibyte character, so its multibyte
representation can take up to MAX_MULTIBYTE_LENGTH bytes.
Account for that when allocating storage for characters to be
encoded. (Bug#40913)
Stefan Kangas [Tue, 28 Apr 2020 08:36:34 +0000 (10:36 +0200)]
Use lexical-binding in most vc tests
* test/lisp/vc/add-log-tests.el:
* test/lisp/vc/diff-mode-tests.el:
* test/lisp/vc/ediff-ptch-tests.el:
* test/lisp/vc/smerge-mode-tests.el:
* test/lisp/vc/vc-hg-tests.el:
* test/lisp/vc/vc-tests.el: Use lexical-binding.
* test/lisp/vc/add-log-tests.el
(add-log-current-defun-deftest): Silence byte-compiler.
Paul Eggert [Mon, 27 Apr 2020 22:46:37 +0000 (15:46 -0700)]
Improve multibyte_length performance
* src/character.h (multibyte_length):
Merge tests so that there are fewer conditional branches.
This improved CPU speed of ‘make compile-always’
by about 1.5% on my platform.
Stefan Monnier [Mon, 27 Apr 2020 22:36:28 +0000 (18:36 -0400)]
* lisp/jit-lock.el: Don't use `make-variable-buffer-local` on hooks.
(jit-lock-functions): Clarify that it's a hook.
(jit-lock-unregister): Adjust accordingly.
Stefan Kangas [Mon, 27 Apr 2020 16:27:24 +0000 (18:27 +0200)]
Use lexical-binding in calendar tests
* test/lisp/calendar/icalendar-tests.el:
* test/lisp/calendar/parse-time-tests.el: Use lexical-binding.
* test/lisp/calendar/icalendar-tests.el (icalendar--format-ical-event)
(icalendar--decode-isodatetime, icalendar-tests--do-test-import)
(icalendar-tests--decode-isodatetime): Silence byte-compiler.
Stefan Kangas [Mon, 27 Apr 2020 15:09:11 +0000 (17:09 +0200)]
Fix typo in custom.texi
* doc/emacs/custom.texi (Variables): Fix typo. Pointed out by
ej32u@protonmail.com. (Bug#40890)
Michael Albinus [Mon, 27 Apr 2020 08:36:33 +0000 (10:36 +0200)]
* test/lisp/simple-tests.el (with-shell-command-dont-erase-buffer):
Use `shell-quote-argument' instead of quoting 'like this'.
Paul Eggert [Mon, 27 Apr 2020 02:30:37 +0000 (19:30 -0700)]
Simplify string-to-char
* src/editfns.c (Fstring_to_char): Simplify.
* src/editfns.c (Fstring_to_char): Simplify.
This tweak improved the CPU time performance of
‘make compile-always’ by about 1.8% on my platform.
Paul Eggert [Sun, 26 Apr 2020 22:18:49 +0000 (15:18 -0700)]
Improve string_char_and_length speed
This tweak improved the CPU time performance of
‘make compile-always’ by about 1.7% on my platform.
* src/character.c (string_char): Remove; no longer used.
* src/character.h (string_char_and_length): Redo so that it
needn’t call string_char. This helps the caller, which can now
become a leaf function.
Glenn Morris [Sun, 26 Apr 2020 23:47:04 +0000 (16:47 -0700)]
* test/lisp/mail/rfc2045-tests.el: Make it work.
Juri Linkov [Sun, 26 Apr 2020 22:33:36 +0000 (01:33 +0300)]
* lisp/image-mode.el (image-mode-map): Update menu items.
* lisp/image-mode.el (image-mode-map): Move "Fit Image to Window (Best Fit)"
higher. Add "Zoom In" (image-increase-size), "Zoom Out" (image-decrease-size)
and "Rotate Clockwise" (image-rotate). Use name "Set Rotation..."
for image-transform-set-rotation. Swap "Next Image" and "Previous Image".
Swap "Next Frame" and "Previous Frame".
Juri Linkov [Sun, 26 Apr 2020 22:28:36 +0000 (01:28 +0300)]
Fix bugs in tab-bar and tab-line and mention remaining features in manual.
* doc/emacs/frames.texi (Tab Bars): Mention tab-bar-new-tab-to,
tab-bar-close-last-tab-choice, tab-bar-close-tab-select, tab-undo,
tab-select, tab-bar-history-mode.
* doc/emacs/windows.texi (Tab Line): Mention tab-line-tabs-function.
* lisp/tab-bar.el (tab-bar-select-tab-modifiers): Mention
tab-bar-tab-hints in docstring.
(tab-bar-tab-hints): Mention tab-bar-select-tab-modifiers
in docstring.
(tab-bar-select-tab): Mention tab-bar-select-tab-modifiers
in docstring.
(tab-bar-switch-to-tab): Expand the docstring.
(tab-bar-new-tab-to): Fix bug in handling 'left' value.
(tab-bar-close-tab): Fix bug in handling 'left' value.
(tab-bar-undo-close-tab): Use funcall tab-bar-tabs-function
instead of direct call to tab-bar-tabs.
(tab-bar-history-back, tab-bar-history-forward): Add docstrings.
(tab-bar-history-mode): Expand docstring.
* lisp/tab-line.el (tab-line-format): Fix bug for handling window
switching that should set face 'tab-line-tab-current'.
Stefan Kangas [Sun, 26 Apr 2020 14:22:34 +0000 (16:22 +0200)]
Use lexical-binding for themes
* etc/themes/adwaita-theme.el:
* etc/themes/deeper-blue-theme.el:
* etc/themes/dichromacy-theme.el:
* etc/themes/light-blue-theme.el:
* etc/themes/manoj-dark-theme.el:
* etc/themes/misterioso-theme.el:
* etc/themes/tango-dark-theme.el:
* etc/themes/tango-theme.el:
* etc/themes/tsdh-dark-theme.el:
* etc/themes/tsdh-light-theme.el:
* etc/themes/wheatgrass-theme.el:
* etc/themes/whiteboard-theme.el:
* etc/themes/wombat-theme.el: Use lexical-binding.
Stefan Kangas [Sun, 26 Apr 2020 12:17:58 +0000 (14:17 +0200)]
Use lexical-binding in dos-vars.el
* lisp/dos-vars.el: Use lexical-binding.
(msdos-shells, dos-codepage-setup-hook): Remove redundant :group
args.
Michael Albinus [Sun, 26 Apr 2020 11:32:01 +0000 (13:32 +0200)]
Fix tramp-test32-shell-command-dont-erase-buffer
* test/lisp/net/tramp-tests.el
(tramp-test32-shell-command-dont-erase-buffer): Adapt test.
Michael Albinus [Sun, 26 Apr 2020 09:39:40 +0000 (11:39 +0200)]
Make shell-command tests fit for tcsh.
* test/lisp/simple-tests.el (with-shell-command-dont-erase-buffer):
Fix debug spec. Format command to run also under tcsh.
(simple-tests-shell-command-39067)
(simple-tests-shell-command-dont-erase-buffer): Quote newline in string.
Stefan Kangas [Sun, 26 Apr 2020 07:19:46 +0000 (09:19 +0200)]
Use lexical-binding in spook.el
* lisp/play/spook.el: Use lexical-binding.
(spook-phrases-file, spook-phrase-default-count): Remove redundant
:group args.
Stefan Kangas [Sat, 25 Apr 2020 23:27:23 +0000 (01:27 +0200)]
Use lexical-binding for rfc2045.el and add tests
* lisp/mail/rfc2045.el: Use-lexical-binding.
* test/lisp/mail/rfc2045-tests.el: New file.
Paul Eggert [Sat, 25 Apr 2020 23:17:25 +0000 (16:17 -0700)]
Inline a couple of functions that were macros
This reclaims a bit of performance when compiling with gcc -Og.
These functions were macros until I changed them in
2020-04-17T14:57:25Z!eggert@cs.ucla.edu.
* src/casefiddle.c (make_char_unibyte):
* src/ccl.c (GET_TRANSLATION_TABLE): Now inline.
Stefan Kangas [Sat, 25 Apr 2020 23:00:39 +0000 (01:00 +0200)]
Use lexical-binding in dig.el and add tests
* lisp/net/dig.el: Use lexical-binding.
(dig-program, dig-dns-server, dig-font-lock-keywords): Remove
redundant :group args.
* test/lisp/net/dig-tests.el: New file.
Stefan Kangas [Sat, 25 Apr 2020 22:27:47 +0000 (00:27 +0200)]
Use lexical-binding in misc.el and add tests
* lisp/misc.el: Use lexical-binding.
* test/lisp/misc-tests.el: New file.
Stefan Kangas [Sat, 25 Apr 2020 21:30:22 +0000 (23:30 +0200)]
Improve list-dynamic-libraries when alist empty
* lisp/misc.el (list-dynamic-libraries--refresh): Improve list format
and show message when 'dynamic-library-alist' is empty.
Paul Eggert [Sat, 25 Apr 2020 18:22:01 +0000 (11:22 -0700)]
Remove doc duplication
* doc/lispref/objects.texi (Constants and Mutability): Remove
duplication. From a suggestion by Andreas Schwab (Bug#40671#150).
Michael Albinus [Sat, 25 Apr 2020 14:54:28 +0000 (16:54 +0200)]
* etc/NEWS: Fix inconsistencies.
Glenn Morris [Sat, 25 Apr 2020 14:50:21 +0000 (07:50 -0700)]
Merge from origin/emacs-27
45a64c97c7 (origin/emacs-27) Clarify semantics of trace-function CONT...
821760fdc4 Don't let a code literal get modified in mml parsing (Bug#...
74a92be16d * lisp/simple.el (kill-ring-save): Doc fix. (Bug#40797)
3d0e859692 Minor doc clarification regarding fringe bitmaps
4d86c7f822 Fix documentation of fringe bitmaps
a76af88dd8 Tweak mutability doc a bit more
f7e488d206 Calc: fix autoload errors (bug#40800)
369761b36d ; * src/xdisp.c: Improve the introductory commentary.
a92ca1f177 Improve indexing of ELisp manual
5a25d17760 * lisp/image-mode.el (image-transform-resize): Remove FIXM...
37ebec3a95 Improve the default value of 'doc-view-ghostscript-program'.
ba6104d1e8 Change doc-view-mode-map prefix key 's' to 'c'.
400ff5cd19 Improve wording about constants
d2836fe71b Improve the default value of 'doc-view-ghostscript-program'.
fc55f65305 Minor improvements in documentation of the last change
a64da75961 Add image-auto-resize defcustoms to image-mode.el
692ad40539 Improve the documentation of tab-bar and tab-line
# Conflicts:
# etc/NEWS
Noam Postavsky [Wed, 15 Apr 2020 02:10:58 +0000 (22:10 -0400)]
Clarify semantics of trace-function CONTEXT argument
* lisp/emacs-lisp/trace.el (trace-function-foreground): Explain that
CONTEXT should be a function, when called from Lisp.
Noam Postavsky [Fri, 17 Apr 2020 00:24:26 +0000 (20:24 -0400)]
Don't let a code literal get modified in mml parsing (Bug#39884)
* lisp/gnus/mml.el (mml-parse-1): Make a fresh cons for the tag type,
because 'mml-generate-mime' destructively modifies it.
Eli Zaretskii [Sat, 25 Apr 2020 13:37:46 +0000 (16:37 +0300)]
Fix GDI+ image loading by file name
Without a call to image_find_image, we can get a file name that
is relative to data-directory/images/, or a file name that
starts with "~/", in which case w32_load_image would fail.
* src/image.c (native_image_load): Call image_find_image_file to
resolve and encode the image file name.
* src/w32image.c (w32_load_image): No need to encode the file
name, as it's already encoded by native_image_load.
Eli Zaretskii [Sat, 25 Apr 2020 10:04:16 +0000 (13:04 +0300)]
* lisp/simple.el (kill-ring-save): Doc fix. (Bug#40797)
Clément Pit-Claudel [Wed, 22 Apr 2020 21:46:07 +0000 (17:46 -0400)]
Minor doc clarification regarding fringe bitmaps
* doc/lispref/display.texi (Customizing Bitmaps): Add a note
regarding the order of bits being the opposite of that in
XBM images. (Bug#40784)
Eli Zaretskii [Sat, 25 Apr 2020 09:48:14 +0000 (12:48 +0300)]
Fix documentation of fringe bitmaps
* doc/lispref/display.texi (Fringe Bitmaps): The 'empty-line'
fringe indicator _is_ used. (Bug#40799)
Igor Saprykin [Thu, 23 Apr 2020 20:00:26 +0000 (13:00 -0700)]
Remove unused variable from ftfont.c
* src/ftfont.c (ftfont_lookup_cache): Eliminate unnecessary variable.
Copyright-paperwork-exempt: yes
Eli Zaretskii [Sat, 25 Apr 2020 09:11:57 +0000 (12:11 +0300)]
Fix two fringe bitmaps
* src/fringe.c (question_mark_bits, exclamation_mark_bits): Fix
the numerical values. (Bug#40805)
Simen Heggestøyl [Sat, 25 Apr 2020 07:10:56 +0000 (09:10 +0200)]
Use lexical-binding in po.el and add tests
* lisp/textmodes/po.el: Use lexical-binding.
* test/lisp/textmodes/po-tests.el: New file with tests for po.el.
Stefan Kangas [Sat, 25 Apr 2020 05:58:26 +0000 (07:58 +0200)]
Use lexical-binding in forms.el example files
* etc/forms/forms-d2.el:
* etc/forms/forms-pass.el: Use lexical-binding.
Paul Eggert [Sat, 25 Apr 2020 02:19:31 +0000 (19:19 -0700)]
Tweak mutability doc a bit more
Inspired by a comment from Michael Heerdegen (Bug#40671#114).
* doc/lispref/objects.texi (Constants and Mutability): Tweak further.
Stefan Kangas [Fri, 24 Apr 2020 22:39:31 +0000 (00:39 +0200)]
; * test/lisp/international/mule-util-tests.el: Fix typos.
Stefan Kangas [Fri, 24 Apr 2020 18:38:47 +0000 (20:38 +0200)]
Use lexical-binding for international tests
* test/lisp/international/mule-util-tests.el:
* test/lisp/international/ccl-tests.el: Use lexical-binding.
Stefan Kangas [Fri, 24 Apr 2020 17:55:47 +0000 (19:55 +0200)]
Use lexical-binding for all net tests
* test/lisp/net/dbus-tests.el:
* test/lisp/net/gnutls-tests.el:
* test/lisp/net/newsticker-tests.el:
* test/lisp/net/puny-tests.el:
* test/lisp/net/rfc2104-tests.el: Use lexical-binding.
Stefan Kangas [Fri, 24 Apr 2020 16:49:28 +0000 (18:49 +0200)]
Use lexical-binding for textmodes tests
* test/lisp/textmodes/mhtml-mode-tests.el:
* test/lisp/textmodes/sgml-mode-tests.el: Use lexical-binding.